Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bep53-range

Package Overview
Dependencies
Maintainers
9
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bep53-range

Magnet URI extension (BEP53) range implementation

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
9
Created
Source

bep53-range ci npm downloads javascript style guide

Parse and compose Magnet URI extension (BEP53) ranges.

Also works in the browser with browserify! This module is used by WebTorrent.

install

npm install bep53-range

usage

parse

Parse Magnet URI extension (BEP53) range and return all included values.

const bep53Range = require('bep53-range')

const range = ['1-3', '6', '11-13']

const values = bep53Range.parse(range)
console.log(values) // [1, 2, 3, 6, 11, 12, 13]

compose

Compose Magnet URI extension (BEP53) range from all included values.

const bep53Range = require('bep53-range')

const values = [1, 2, 3, 6, 11, 12, 13]

const range = bep53Range.compose(values)
console.log(range) // ['1-3', '6', '11-13']

license

MIT. Copyright (c) Julen Garcia Leunda and WebTorrent, LLC.

Keywords

FAQs

Package last updated on 23 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc